  <script>
      function receiveMessage(e) {
        alert(e.data);
      }
      window.addEventListener("message", receiveMessage, false);
    </script>
	
	
	<input type="text" value="send" id="input" />
    <input type="button" value="send" id="button" />
    <script>
      document.getElementById('button').onclick = function () {
          top.postMessage(document.getElementById('input').value, '*');
      };
    </script>